This invention relates to communications systems, and in particular to the connection of client and server devices through a packet-switched communications system.
Network address translation (NAT) is the process of modifying network address information in datagram packet headers while in transit across a traffic routing device or gateway for the purpose of remapping a given address space into another. This process is very useful in building small private networks, as it allows all terminations to share a global routable IP (Internet Protocol) address. Terminations using this system can then intercommunicate using a private IP address realm, with the NAT gateway having a public address on its public-facing side.
The individual hosts behind the NAT gateway can still initiate connections with entities outside the gateway. However entities outside the gateway cannot initiate communications to individual host devices behind the gateway, as they do not have visibility of the private IP addresses behind the gateway.
In a Peer-to-Peer network, hosts behind a NAT gateway have to be reached directly for some purposes in order to communicate with other peers. However, NAT gateways hide individual hosts, so that peers are not reachable globally. This can be worked around by having the outside entity specify the public IP address of the NAT gateway, together with the identity of a port on the gateway, and for the NAT gateway to have a mapping of each port to a pre-specified internal private IP and port. However, this results in breaking common end-to-end connections. NAT technologies are not standardized so that the proliferation of NAT devices makes it difficult for peer-to-peer applications to inter-operate.
The present invention provides a system that allows reliable communication to be established with a termination served by an NAT gateway.
According to the invention there is provided a process for establishing communication between a server device connected to a network, and a client device connected to the server device through a gateway also connected to the network, wherein the gateway has associated therewith a router and a plurality of connection servers through which client devices may be connected to the gateway, and wherein each connection server reports its recent connections with respective client devices, and wherein when a connection request for a target client device is transmitted from the server to the router, the router requests connection history of the target device from each of the plurality of connection servers associated with the gateway, each connection server reporting its connection history respective to the target client device, and the router attempts communication with the client device through the connection server with the most recent connection.
In a preferred embodiment the router transmits an instruction to the client device to initiate a communication connection with the server device. This preserves the integrity of the gateway and ensures that, should the client device and connection server later become dissociated, the server device does not attempt to make connection with another client device subsequently associated with the same connection server.
Also in the preferred embodiment, the router transmits the connection request to more than one of the connection servers, each of the connection servers receiving the request transmits a response to the router to indicate whether the target client device is currently connected to that connection server, and the router updates the data in the store associated with the connection server, if any, to which the target client device is connected to provide updated data for that connection server.
In the preferred embodiment, the router selects one or more connection servers for the connection attempt, according to timestamp data identifying one or more of the most recent connections. When connection is made with one of the connection servers the time stamps associated with the other connection servers may be deleted or, particularly if no connection server reports connection to the target device, the timestamps may be retained as indicative of the likely location of the target device when next it goes on line.
6. The invention also extends to a network gateway for establishing connection between one or more client devices and a network connection, the gateway comprising a plurality of connection servers, a router, a transmitter, a store for storing data associated with each connection server relating to its respective recent connections to each of one or more client devices, and a receiver for receiving a request from the network connection for connection to a target client device,
the router being responsive to such a connection request to request a connection history of the target device from each of the plurality of connection servers, each connection server reporting its connection history respective to the target client device, and the router being configured to attempt communication with the client device through the connection server with the most recently reported connection.